package cn.tedu.submarine;

import javax.swing.*;

/** 深水炸弹 */
public class Bomb extends SeaObject {

    Bomb(int x,int y){
        super(9,12,x,y,3);

    }
    /** 重写move移动    */
    public void move(){
        y+=speed;//y+(向下)
    }

    public ImageIcon getImage(){
        return Images.bomb;
    }
    /**重写isOutOfBound（）判断*/
    public boolean isOutOfBound(){
        return this.y>=World.HEIGHT;//深水炸弹的y>=窗口的高，即为越界
    }




}
